package com.example.servicebase.client;

import com.example.commonutils.ordervo.CourseForOrder;
import com.example.servicebase.entity.EduCourse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient(value = "service-edu",fallbackFactory = EduClientFallbackFactory.class)
public interface EduClient {

    @GetMapping(value = "/backstage/course/getCourseById/{courseId}")
    public EduCourse getCourseById(@PathVariable String courseId);

    @GetMapping("/backstage/coursefront/getCourseForOrder/{courseId}")
    public CourseForOrder getCourseForOrder(@PathVariable("courseId") String courseId);

    @GetMapping("/backstage/course/buycount/{courseId}")
    public void buyCount(@PathVariable("courseId") String courseId);

    @GetMapping("/backstage/VideoFront/getViewCount")
    Integer getViewCount();

    @GetMapping("/backstage/course/getCourseCount")
    Integer CourseCount();
}
